<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master"
    CodeBehind="VideoEdit.aspx.cs" Inherits="ud_Video.UI.VideoEditPage" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
    <portal:ModulePanel ID="pnlContainer" runat="server" CssClass="admin">
        <portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
            <mp:CornerRounderTop ID="ctop1" runat="server" />
            <div class="modulecontent">
                <fieldset>
                    <legend>
                        <asp:Literal ID="ltrTitle" runat="server"></asp:Literal>
                    </legend>
                    <div class="settingrow">
                        <%-- <asp:UpdatePanel ID="upItems" UpdateMode="Conditional" runat="server">
        <ContentTemplate>--%>
                        <mp:mojoGridView ID="gvItems" runat="server" EnableViewState="false" AutoGenerateColumns="false"
                            AllowPaging="true" CssClass="items">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl='<%# ImageSiteRoot + "/Data/SiteImages/" + WebConfigSettings.EditContentImage %>'
                                            CommandName="EditItem" CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# EditLinkText %>"
                                            CausesValidation="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl='<%# ImageSiteRoot + "/Data/SiteImages/" + WebConfigSettings.DeleteLinkImage %>'
                                            CommandName="DeleteItem" CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# DeleteLinkText %>"
                                            CausesValidation="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </mp:mojoGridView>
                        <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
                    </div>
                    <div class="settingrow">
                        <mp:SiteLabel ID="lblName" runat="server" ForControl="txtName" ResourceFile="VideoResource"
                            ConfigKey="LabelName" />
                    </div>
                    <div class="settingrow">
                        <asp:TextBox ID="txtName" runat="server" MaxLength="255" CssClass="widetextbox" />
                        <asp:RequiredFieldValidator ID="rfvName" ErrorMessage="*" runat="server" ControlToValidate="txtName"
                            ValidationGroup="Video" />
                    </div>
                    <div class="settingrow">
                        <mp:SiteLabel ID="lblDescription" runat="server" ForControl="txtDescription" ResourceFile="VideoResource"
                            ConfigKey="LabelDescription" />
                    </div>
                    <div class="settingrow">
                        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" CssClass="widetextbox" />
                    </div>
                    <div class="settingrow">
                        <mp:SiteLabel ID="lblVideoItem" runat="server" ForControl="nuImageUrl" CssClass="settinglabel"
                            ConfigKey="ItemVideoLabel" ResourceFile="VideoResource"></mp:SiteLabel>
                    </div>
                    <div class="settingrow">
                        <NeatUpload:InputFile ID="nifVideo" runat="server" CssClass="forminput" />
                        <NeatUpload:ProgressBar ID="npbVideo" runat="server">
                        </NeatUpload:ProgressBar>
                        <asp:Label ID="lblVideoUrlError" runat="server" />
                        <div runat="server" id="divVideo" visible="false" class="image">
                            <asp:HyperLink ID="hplItem" runat="server" />
                        </div>
                    </div>
                    <div class="settingrow">
                        <mp:SiteLabel ID="lblImageThumbnail" runat="server" ForControl="nuImageUrl" CssClass="settinglabel"
                            ConfigKey="ItemImageUrlLabel" ResourceFile="VideoResource"></mp:SiteLabel>
                    </div>
                    <div class="settingrow">
                        <NeatUpload:InputFile ID="nuImageUrl" runat="server" />
                        <asp:Label ID="lblImageUrlError" runat="server" />
                    </div>
                    <div class="settingrow">
                        <asp:UpdatePanel ID="updImgDel" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <div runat="server" id="divImage" visible="false">
                                    <mp:SiteLabel ID="lblCurrentImage" runat="server" ForControl="imgView" CssClass="settinglabel"
                                        ConfigKey="CurrentImageLabel" ResourceFile="VideoResource"></mp:SiteLabel>
                                    <asp:Image runat="server" ID="imgView" Width="100px" Style="max-height: 60px" />
                                    <asp:ImageButton ID="btnDeleteImg" runat="server" CausesValidation="false" />
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                    <div class="settingrow">
                        <asp:CheckBox ID="chkPublish" runat="server" Checked="true" />
                    </div>
                    <div class="settingrow">
                        <portal:mojoButton ID="btnSave" runat="server" ValidationGroup="Video" />
                        <portal:mojoButton ID="btnNew" runat="server" CausesValidation="false" />
                        <portal:mojoButton ID="btnDelete" runat="server" Visible="false" CausesValidation="false" />
                    </div>
                    <div class="cleared">
                    </div>
                </fieldset>
            </div>
            <mp:CornerRounderBottom ID="cbottom1" runat="server" />
        </portal:mojoPanel>
    </portal:ModulePanel>
    <div class="cleared">
    </div>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
